package project.model;

import java.awt.Point;

public abstract class ARoom {
    private Point toaDo;
    private ARoom north;
    private ARoom east;
    private ARoom south;
    private ARoom west;
	private int roomNr;
	private Hero visitor;
	
	public ARoom(int num, Point point) {
        this.setRoomNr(num);
        this.setToaDo(point);
    }
	
    public int getRoomNr() {
        return roomNr;
    }
    
    public void setRoomNr(int roomNr) {
        this.roomNr = roomNr;
    }

    public final ARoom getNorth() {
        return north;
    }

    public final void setNorth(ARoom north) {
        this.north = north;
    }

    public final ARoom getEast() {
        return east;
    }

    public final void setEast(ARoom east) {
        this.east = east;
    }

    public final ARoom getSouth() {
        return south;
    }

    public final void setSouth(ARoom south) {
        this.south = south;
    }

    public final ARoom getWest() {
        return west;
    }

    public final void setWest(ARoom west) {
        this.west = west;
    }

    public Point getToaDo() {
        return toaDo;
    }

    public void setToaDo(Point toaDo) {
        this.toaDo = toaDo;
    }
    
    public boolean chuyenDong(int num) {
        return this.roomNr != num;
    }

    public final Hero getVisitor() {
        return visitor;
    }

    public final void setVisitor(Hero visitor) {
        this.visitor = visitor;
    }
    
    public boolean isVisitorInRoom(){
    	return this.visitor != null;
    }
    
    public abstract boolean isMagicRoom();
    public abstract boolean goInRoom(Hero hero);
    
}
